1. Field of the Invention
The present invention relates to a printer, a printer system that includes a printer and a printer server, and a method, which may be performed by either the printer or printer server, and which, automatically and without user intervention, quickly acquires a network address for the printer, and quickly informs a user of that fact and that a network connection has been established.
2. Description of the Related Art
Network printers are commonly used on networks, such as local area networks (LANs), for printing in response to print commands sent from multiple client terminals on the network. Such a network printer communicates with the individual client devices using an appropriate protocol, e.g., TCP/IP, to send and receive print commands and print data. Printers and other network devices that communicate with other devices on a LAN using TCP/IP first acquire specific network parameters including the IP address, the subnet mask for that IP address, and the gateway, and use these network parameters to communicate with other devices.
Various methods can be used to acquire the network parameters. One common method is by using the Dynamic Host Configuration Protocol (DHCP). DHCP is a protocol for automatically assigning an IP address and other network parameters to a device when the device starts up or connects to the network. Once DHCP is enabled, network parameters are automatically assigned to each device, thus eliminating the need for the network administrator or user to manually assign the network parameters. As a result, when a DHCP-enabled device is connected to the network and turned on, the device will be automatically recognized by other devices on the network without intervention by the user, thereby enabling access to printers and other data devices on the network. In order to use DHCP, however, a DHCP server for assigning IP addresses must also be connected to the network. IP address allocation using DHCP is described briefly below.
After a device is turned on and connected to a network (such a device is referred to as a “client device” below because it is a client requesting a service, i.e., an IP address from the server), the client device broadcasts a DISCOVER packet to all other devices on the network in order to locate the DHCP server. Any device that receives this DISCOVER packet but which is not the DHCP server simply ignores the packet. However, if the device receiving the DISCOVER packet is the DHCP server, the DHCP server then sends an OFFER packet reporting the usable network settings to the client device and thus tells the client device that a DHCP server is available.
After the client device receives the OFFER packet in reply from the DHCP server, the client device broadcasts a network settings REQUEST packet over the network telling the DHCP server that the client device intends to use the offered IP address and other network parameters. A new client device to be added to the network can thus acquire an IP address and can thereafter communicate directly, i.e., one-to-one, with other devices on the network.
A different method of determining IP addresses is called Automatic Private IP Addressing (APIPA). Using the APIPA protocol the client device randomly selects and assigns itself an IP address in the range 169.254.1.0 to 169.254.254.255. The client device then broadcasts an ARP (Address Resolution Protocol) packet using the selected IP address to the other devices on the network. Each network device receives this discover packet and compares the IP address in the packet with the IP address assigned to itself. If the IP address in the discover packet matches the IP address assigned to the network device that received the packet, that network device generates and broadcasts a reply packet over the network.
If the network device that sent the discover packet thus receives a reply from another network device, the client device requesting an address knows that the selected IP address is already in use, therefore selects another IP address, and broadcasts a new ARP discover packet containing this newly selected IP address. If a reply packet responding to this discover packet is not received, the client device knows that the IP address in the discover packet is available, that is, the IP address is not currently being used by another device on the network. By thus selecting this IP address for its own IP address, the requesting client device acquires a unique IP address, that is, an IP address that is not already used by another network device.
By using APIPA, a requesting client device can thus communicate with other systems on the network with no awareness of network IP addresses. However, APIPA assumes a small-scale network, and a router cannot route packets exchanged using IP addresses acquired by the APIPA protocol. This means that the communication range of a client device using an IP address acquired using the APIPA protocol is limited to the local network (specifically, the packet broadcasting range), and such client devices cannot communicate through a router with devices on a different network. Communication between networks is thus not possible using addresses acquired with the APIPA protocol.
General-purpose operating systems typically first attempt to acquire an IP address using DHCP, and then acquire an IP address using APIPA if getting an IP address using DHCP fails. This function of acquiring an IP address by first using DHCP and then using APIPA if DHCP fails, is referred to herein as a “dynamic IP address resolution function.”
When an IP address is assigned to a client device by means of this dynamic IP address resolution function, the user must use utility software or enter specific commands in order to learn the assigned IP address.
Furthermore, the Media Access Control (MAC) address and IP address information stored on the DHCP server connected to the network must be searched to get the IP address information that is assigned to a particular device when DHCP is used.
This operation is possible if the client device is a personal computer having a display, but the IP address cannot be displayed using this method if the client device does not have a display or if the display area is too small to present the IP address, such as when the client device is a network printer.
The time required to get an IP address using this dynamic IP address resolution function is on average between 10 and 20 seconds from the time the client device power is turned on and started up, if the IP address is successfully assigned by DHCP. If address assignment by DHCP fails and the IP address is determined by APIPA, however, an average of approximately 1 minute is required from when the device boots up. Because 1:1 communication with other network devices is not possible until the IP address is determined, the foregoing method must be repeatedly used to determine if the IP address has been assigned and communication enabled. However, while this method can be used on a personal computer, a network printer cannot use this method to easily determine if the IP address has been assigned and quickly inform the user that the IP address was set.